package com.gl.saasservice.advertisement.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.gl.saasservice.entity.IdEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * 广告表
 */
@Entity
@Table(name = "saas_ad")
public class SaasAd extends IdEntity {
    /**
     * 广告位id
     */
    @Column(name = "space_id", nullable = true)
    private Long spaceId;
    /**
     * 广告名称
     */
    @Column(name = "name", nullable = true)
    private String name;
    /**
     * 广告开始时间
     */
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm")
    @Column(name = "publish", nullable = true)
    private Date publish;
    /**
     * 广告结束时间
     */
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm")
    @Column(name = "expire", nullable = true)
    private Date expire;
    /**
     * 广告图
     */
    @Column(name = "ad_pic", nullable = true)
    private String adPic;
    /**
     * 广告链接
     */
    @Column(name = "ad_link", nullable = true)
    private String adLink;
    /**
     * 上架状态:0未上架、1已上架
     */
    @Column(name = "status", nullable = true)
    private Integer status;
    /**
     * 审核状态：0未审核、1已审核 2审核不通过
     */
    @Column(name = "auditor_status", nullable = true)
    private Integer auditorStatus;
    /**
     * 审核人
     */
    @Column(name = "auditor_id", nullable = true)
    private Long auditorId;
    /**
     * 创建人
     */
    @Column(name = "creator_id", nullable = true)
    private Long creatorId;
    /**
     * 创建时间
     */
    @Column(name = "create_time", nullable = true)
    private Date createTime;
    /**
     * 公告内容
     */
    private String content;

    @Column(name = "content", nullable = true,columnDefinition = "TEXT")
    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }


    public Long getSpaceId() {
        return spaceId;
    }

    public void setSpaceId(Long spaceId) {
        this.spaceId = spaceId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Date getPublish() {
        return publish;
    }

    public void setPublish(Date publish) {
        this.publish = publish;
    }

    public Date getExpire() {
        return expire;
    }

    public void setExpire(Date expire) {
        this.expire = expire;
    }

    public String getAdPic() {
        return adPic;
    }

    public void setAdPic(String adPic) {
        this.adPic = adPic;
    }

    public String getAdLink() {
        return adLink;
    }

    public void setAdLink(String adLink) {
        this.adLink = adLink;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getAuditorStatus() {
        return auditorStatus;
    }

    public void setAuditorStatus(Integer auditorStatus) {
        this.auditorStatus = auditorStatus;
    }

    public Long getAuditorId() {
        return auditorId;
    }

    public void setAuditorId(Long auditorId) {
        this.auditorId = auditorId;
    }

    public Long getCreatorId() {
        return creatorId;
    }

    public void setCreatorId(Long creatorId) {
        this.creatorId = creatorId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }


    @Override
    public String toString() {
        return "SaasAd{" +
                "spaceId=" + spaceId +
                ", name='" + name + '\'' +
                ", publish=" + publish +
                ", expire=" + expire +
                ", adPic='" + adPic + '\'' +
                ", adLink='" + adLink + '\'' +
                ", status=" + status +
                ", auditorStatus=" + auditorStatus +
                ", auditorId=" + auditorId +
                ", creatorId=" + creatorId +
                ", createTime=" + createTime +
                ", id=" + id +
                '}';
    }
}
